<template>
    <view>
        <button type="primary" plain open-type="getUserInfo" @getuserinfo="handleGetUserInfo">登录</button>
    </view>
</template>

<script>
export default {
    data() {
        return {};
    },
    methods: {
        handlegetuserinfo(e) {
            const { userinfo } = e.detail;
            uni.setStorageSync('userInfo', userinfo);
            uni.navigateBack({
                delta: 1
            });
        },

        handleGetUserInfo() {
            console.log('占位：函数 handleGetUserInfo 未声明');
        }
    }
};
</script>
<style>
@import './index.css';
</style>
